home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_randamb.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  89 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_RandAmb.cog
  4. #
  5. # [TRM] && [DS]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     message        pulse
  14.  
  15.     thing        soundPos0        nolink
  16.     thing        soundPos1        nolink
  17.     thing        soundPos2        nolink
  18.     thing        soundPos3        nolink
  19.     thing        soundPos4        nolink
  20.     thing        soundPos5        nolink
  21.     thing        soundPos6        nolink
  22.     thing        soundPos7        nolink
  23.     thing        soundPos8        nolink
  24.     thing        soundPos9        nolink
  25.     
  26.     sector      startAmbients_a
  27.     sector      startAmbients_b
  28.     sector      stopAmbients_a
  29.     sector      stopAmbients_b
  30.  
  31.     sound        wav0=gen_cave_a1.wav    local
  32.     sound        wav1=gen_cave_a2.wav    local
  33.     sound        wav2=gen_cave_a3.wav    local
  34.     sound        wav3=gen_cave_a4.wav    local
  35.     sound        wav4=gen_cave_a5.wav    local
  36.     sound        wav5=gen_cave_a6.wav    local
  37.  
  38.     float        minDist=-1        local
  39.     float        maxDist=-1        local
  40.     float        volume=0.6        local
  41.     
  42.     int            sndNum            local
  43.     int            numPos=10        local
  44.     int            count           local
  45.  
  46. end
  47.  
  48. # ========================================================================================
  49.  
  50. code
  51.  
  52. entered:
  53.  
  54.     if((GetSenderRef() == startAmbients_a) || (GetSenderRef() == startAmbients_b))
  55.     {
  56.         setpulse(2.0);
  57.     }
  58.     
  59.     if((GetSenderRef() == stopAmbients_a) || (GetSenderRef() == stopAmbients_b))
  60.     {
  61.         setpulse(0.0);
  62.     }
  63.     
  64.     return;
  65.  
  66. # ========================================================================================
  67.  
  68. pulse:
  69.  
  70.     SetPulse(0.0);
  71.     sndNum = RandBetween(0, 5);
  72.     
  73.     for (count = 0; count < numPos; count = count+1) 
  74.     {
  75.         if (soundPos0[count] >= 0) 
  76.         {
  77.             PlaySoundThing(wav0[sndnum], soundPos0[count], volume, minDist, maxDist, 0);
  78.         }
  79.     }
  80.     
  81.     SetPulse(2.0);
  82.     
  83.     return;
  84.  
  85. # ========================================================================================
  86.  
  87. end
  88.  
  89.